<?php echo form_open(uri_string(), 'id="edit_account" class="crud ajaxform"'); ?>

<fieldset style="margin-bottom: 0">
	<ol>
		<li>
			<label>E posta</label>
			<input type="text" name="email" value="<?php echo $user->email; ?>" />
		</li>
		
		<li>
			<label>Seviye</label>
			<?php echo form_dropdown('role_id', $roles, $user->role_id); ?>
		</li>
		
		<li>
			<label>Şifreyi değiştir</label>
			<input type="checkbox" name="change_password" id="cp_toggle" />
		</li>
		
		<div style="display: none" id="change_password">
		
			<li>
				<label>Yeni Şifre</label>
				<input type="password" name="password" />
			</li>
			
			<li class="even">
				<label>Şifre Doğrulama</label>
				<input type="password" name="passwordconf" />
			</li>
		
		</div>
		
		<li>
			<label></label>
			<input type="submit" value="Gönder" />
		</li>
	</ol>
</fieldset>

<?php echo form_close(); ?>

<script type="text/javascript">

    jQuery('#cp_toggle').click(function(){
    	
        if(jQuery(this).is(':checked')) {
            $('#change_password').stop(true,true).fadeIn();
            $.colorbox.resize();
        } else {
            $('#change_password').stop(true,true).hide();
            $.colorbox.resize();
        }
    });

</script>

